<!doctype html>
<html lang="zh-CN">
<!-- 定义CSS与JS文件路径 -->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>查询界面</title>

    <link href="static/css/qbcx.css" rel="stylesheet" type="text/css"/>
    <link href="static/css/bootstrap.css" rel="stylesheet"/>
    <link href="static/css/bootstrap-table.css" rel="stylesheet"/>

    <script type="text/javascript" src="static/js/jquery-1.11.3.min.js"></script>
    <script src="static/js/bootstrap.js"></script>
    <script type="text/javascript" src="static/js/bootstrap-table.js"></script>
    <script type="text/javascript" src="static/js/data.js"></script>
</head>
</html>
<body class="vsc-initialized">
<!-- 显示第一个蓝条块 -->
<div style="background-color:rgb(39,86,156);">
    <div class="container">
        <div class="row">
            <div class="col-sm-12">
                <div style="color:#ff9c3d;padding:5px 0"></div>
            </div>
        </div>
    </div>
</div>
<!-- 显示LOGO区域 -->
<!-- 放置纯色背景 -->
<div style="width:100%;background-image:url(static/images/bannerbg.jpg);">
    <div class="container">
        <div class="row hidden-xs hidden-sm" style="position:relative;height:180px;">
            <!-- 主要LOGO -->
            <img src="static/images/main-logo.png" style="position:absolute;z-index:1000;top:50px;left:30px;"/>
            <img src="static/images/logo4.jpg" width="802" height="180"
                 style="position:absolute;z-index:999;top:0;right:0;"/>
        </div>
    </div>
</div>
<!-- 导航栏 -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
    <div class="container">
        <div class="navbar-header">
            <!-- 暂时默认当前界面为主页面，点击按钮即刷新 -->
            <a style="font-size:15px;" class="navbar-brand " href="/filter">筛选界面</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="">
                    <a href="/query">查询界面</a>
                </li>
                <li class="">
                    <a href="/train">管理员界面</a>
                </li>
                <li class="">
                    <a href="/predict">预测企业界面</a>
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li class="">
                    <a href="/">帮助</a>
                </li>
            </ul>
        </div>
    </div>
</nav>

<input type="text" id="search" value=""
       placeholder="企业名称，输入多个则以逗号隔开" style="width: 90%;height: 30px;margin-left: 5px"/>
<button id="search_btn" class="btn btn-default" type="button" onclick="signalQuery()" style="width: 9%;height: 30px">
    查询
</button>

<div id="myTableDiv">
    <table id="myTable" class="table result_list table-striped table-hover">
        <thead>
        <th>序号</th>
        <th>企业名称</th>
        <th>企业类型</th>
        <th>企业类别</th>
        <th>行业门类</th>
        <th>目前状态</th>
        <th>驰名商标</th>
        <th>著名商标</th>
        <th>专精特新中小企业</th>
        <th>企业技术中心级别</th>
        <th>信用水平</th>
        <th>信用危机</th>
        <th>企业能力</th>
        <th>稳定水平</th>
        <th>企业年龄</th>
        <th>企业规模</th>
        <th>经营风险</th>
        <th>司法风险</th>
        </thead>
        <tbody id="dataTable"></tbody>
    </table>
</div>

<div class="pull-right pagination">
    <ul class="pagination">
        <li id="f_page"><a>&lt;&lt;</a>
        </li>
        <li id="pre_page"><a>&lt;</a></li>
        <li><a style="padding: 0"><input id="page_turn" type="number" min="1" max="1" oninput="OnInput()" value="1"
                                         style="height: 32px;width: 80px"/></a></li>
        <li id="next_page"><a>&gt;</a></li>
        <li id="l_page"><a href="javascript:void(0)">&gt;&gt;</a></li>
    </ul>
</div>
<script>
    filter=[]
    function OnInput() {
        //alert ("The new content: " + document.getElementById("page_turn").value);
        document.getElementById("page_turn").value
        signalQuery()
    }

    //var max_page=data["total"];    //最大页数 从服务器获取
    var max_page = 30


    var page_num = document.getElementById("page_turn") //当前页面数的输入框
    var pre = document.getElementById("pre_page")       //向前
    var next_p = document.getElementById("next_page")      //向后
    var first_p = document.getElementById("f_page")
    var last_p = document.getElementById("l_page")

    pre.onclick = function () {                         //向前翻页
        var num = parseInt(page_num.value) - 1
        if (num < 1)
            num = 1
        page_num.value = num
        signalQuery()
    }

    next_p.onclick = function () {                       //向后翻页
        var num = parseInt(page_num.value) + 1
        if (num > max_page)
            num = max_page
        page_num.value = num
        signalQuery()
    }
    first_p.onclick = function () {                       //首页
        page_num.value = 1
        signalQuery()
    }
    last_p.onclick = function () {                      //尾页
        page_num.value = max_page
        signalQuery()
    }
</script>
</body>